Fix another outfit-related CTD#347
Conversation
Defers notifying observers to run on the main thread. Fixes a CTD wherein glyph creation could happen outside of the main thread which would cause a CTD if uncaught.
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesMain Coro Dispatch for Inventory Notifications
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@indra/newview/llaisapi.cpp`:
- Around line 1748-1757: Throttle the deferred inventory notifications so they
are posted once per batch instead of once for every overflowed item. In the
inventory fetch/update path around gInventory.notifyObservers() and the
category-create path, add a guard or pending flag so repeated iterations while
mChangedItemIDs remains above MAX_UPDATE_BACKLOG do not queue duplicate
postToMainCoro callbacks. Make sure the same batching logic is applied
consistently in both places that currently defer notifyObservers().
- Around line 1683-1692: The backlog refresh logic in the inventory checks is
repeatedly posting notifyObservers() because deferred execution leaves
gInventory.getChangedIDs().size() above MAX_UPDATE_BACKLOG until the main loop
runs. Add a single pending-refresh/coalescing flag around the backlog paths in
llAisApi so only one deferred inventory refresh can be queued at a time, and
clear that flag when the posted callback runs and notifyObservers() completes.
Apply the same guard to both backlog checks in llAisApi to preserve throttling
and prevent gMainloopWork from being flooded.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5873a2ea-9cbc-418c-a777-28e71e0a6d75
📒 Files selected for processing (1)
indra/newview/llaisapi.cpp
Description
Defers notifying observers to run on the main thread. This fixes a CTD wherein glyph creation could happen outside of the main thread which would cause a CTD if uncaught.
Related Issues
Issue Link:
Checklist
Please ensure the following before requesting review:
Additional Notes